package it.terry.luminosita;



import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;

public class Autocordsender extends Thread {

	
	@SuppressWarnings("unused")
	private Context ctx;
	private Handler handler;
	
	
	public Autocordsender(Context ctx, Handler handler){
		this.ctx = ctx;
		this.handler = handler;
	}
	@Override
	public void run(){
		
		
	        
	}
	public void set_cordinata(float lux){
		float[] valore_lig = new float[1];
		valore_lig[0] = lux;
	    notifyMessage(valore_lig);
	}
	public void notifyMessage(float[] val){
		Message msg = handler.obtainMessage();
	    Bundle b = new Bundle();
	    b.putFloatArray("refresh", val);
	    msg.setData(b);
	    handler.sendMessage(msg);
	}
	
}
